package com.maya.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.maya.model.User;
import com.maya.service.UserService;



@Controller

public class RegController {
	
	@Autowired
	private UserService userService;
	
	@RequestMapping(value = "/regist",method = RequestMethod.POST)
	public String regist(User user){
        userService.save(user);
        return "redirect:/viewallquestions";
        
    }
}
